<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglib.jsp" %>    
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script>

	var selPersonId_d = null;
	
	$(document).ready(function() {
		
		// 选择表格行
		$("#gridOrgPerson table > tbody > tr").click(function() {
			$("#gridOrgPerson table > tbody > tr").removeClass('info');
			$(this).addClass('info');
			selPersonId_d = $(this)[0].id;
		});
		
	});
	
	function btn_ok_click() {
		if (selPersonId_d == null) {
			alert("请选择");
			return;
   	 	}
		
		onSelectPositionEvent(selPersonId_d);
	}

</script>

</head>

<body>

<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
		&times;
	</button>
	<h4 class="modal-title">设置主岗</h4>
</div>

<div class="modal-body">
	<div id="gridOrgPerson" class="table-responsive">
		<table class="table table-hover table-bordered">
		   <thead>
		     <tr>         
		       <th>组织路径</th>      
		     </tr>
		   </thead>
		   <tbody>
			<c:forEach items="${listOrganization}" var="node" varStatus="status">		
				<tr id='${node.orgId}'>
				<td>${node.chineseAllPath}</td>
				</tr>
			</c:forEach>	
		   </tbody>
		</table>
	</div>
</div>

<div class="modal-footer">	
	<button type="button" class="btn btn-primary" onclick="btn_ok_click();">确定</button>
	<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>	
</div>
   	
</body>
</html>
